package com.geektime.hello;

import com.google.common.base.Joiner;
import com.google.common.base.Splitter;

import java.util.Arrays;
import java.util.List;

/**
 * @Author: DRevelation
 * @Date: 2021/2/19 16:08
 */
public class DebugDemo {

    private static final Joiner joiner = Joiner.on(", ").skipNulls();
    private static final Splitter splitter = Splitter.on(", ").omitEmptyStrings().trimResults();

    public static void main(String[] args) {
        String str = joiner.join(Arrays.asList(1, 2, 3, null, 4, 5));
        System.out.println("str = " + str);
        List<String> list = splitter.splitToList(str);
        System.out.println("list = " + list);
    }
}
